#include"General_func.h"
#include<stdio.h>
/*------通用函数-------*/

//   文本框与键盘
void keyboard_event_cb(lv_event_t* e)
{

    lv_event_code_t code = lv_event_get_code(e);
    lv_obj_t* target = lv_event_get_target(e);
    if(code == LV_EVENT_FOCUSED) //点击是文本框
    {
        lv_obj_clear_flag(keyboard, LV_OBJ_FLAG_HIDDEN);//清楚隐藏标志
        lv_keyboard_set_textarea(keyboard, target);//选中与键盘进行关联
    }

    //焦点失去，隐藏键盘
    if(code == LV_EVENT_DEFOCUSED) {
        lv_keyboard_set_textarea(keyboard, NULL);
        lv_obj_add_flag(keyboard, LV_OBJ_FLAG_HIDDEN);
    }
}

// void return_origin_event_cb(lv_event_t *e)
// {
//     Identity_choice();
// }